<?php

namespace app\admin\validate;

use think\Validate;

class VersionValidate extends Validate
{
    protected $rule =   [
        'versionCode' => 'require',
        'versionName' => 'require',
        'versionInfo' => 'require',
        'updateType' => 'require',
        'fileId' => 'require',
    ];

    protected $message = [
        'versionCode.require' => '缺少参数versionCode',
        'versionName.require' => '缺少参数versionName',
        'versionInfo.require' => '缺少参数versionInfo',
        'updateType.require' => '缺少参数updateType',
        'fileId.require' => '缺少参数downloadUrl',
    ];

    protected $scene = [
        'add' => ['versionCode', 'versionName', 'versionInfo', 'updateType', 'fileId'],
    ];
}